import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '@/views/Index.vue'
import AddQuestion from '@/views/AddQuestion.vue'
import AddQuestions from '@/views/AddQuestions.vue'
import ShowQuestion from '@/views/ShowQuestion.vue'
import Square from '@/views/Square.vue'
import Login from '@/views/Login.vue'
import Signin from '@/views/Signin.vue'
import AutomaticGroup from '@/views/AutomaticGroup.vue'


const router = createRouter({
  history: createWebHashHistory(), // hash 模式
  routes: [
    {
      path: '/',
      name: 'index',
      component: ShowQuestion
    },
 
    {
      path: '/addQuestions',
      name: 'addQuestions',
      component: AddQuestions
    },
    {
      path: '/square',
      name: 'square',
      component: Square
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/signin',
      name: 'signin',
      component: Signin
    },
    {
      path: '/getQuestionsById',
      name: 'getQuestionsById',
      component: ShowQuestion
    },
    {
      path: '/getQuestionsByKnowledgepoint',
      name: 'getQuestionsByKnowledgepoint',
      component: ShowQuestion
    },
    {
      path: '/getQuestionsByChapter',
      name: 'getQuestionsByChapter',
      component: ShowQuestion
    },
    {
      path: '/getQuestionsBySection',
      name: 'getQuestionsBySection',
      component: ShowQuestion
    },
    {
      path: '/getQuestionsByCourse',
      name: 'getQuestionsByCourse',
      component: ShowQuestion
    },
    {
      path: '/searchQuestion',
      name: 'searchQuestion',
      component: ShowQuestion
    },
    {
      path: '/addQuestion',
      name: 'addQuestion',
      component: AddQuestion
    },
    {
      path: '/automaticGroup',
      name: 'automaticGroup',
      component: AutomaticGroup
    },
  ]
})

export default router